import state from './state'
import * as type from './type'

const reducers = ( previousState = state, action) => {
    const newState = {
        ...previousState
    }
    switch (action.type) {
        case type.GETMESSAGE:
            newState.cards = action.payload
            break;
    
        default:
            break;
    }
    return newState
}

export default reducers